
//***********************************************
//
//      Filename: pp5_3.java
//
//        Author: wwb
//        Mails: 1274860621@qq.com
//        Create: 2018-04-08 15:48:55
// Last Modified: 2018-04-08 15:48:55
//***********************************************

import java.util.Scanner;

public class pp5_3 {
    public static void main(String[] args) {
        int count1 = 0, count2 = 0, count3 = 0, number3 = 0;
        int number1, number2;
        String number, number4;

        Scanner scan = new Scanner(System.in);

        System.out.println("Please enter a number: ");
        number = scan.nextLine();
        number1 = number.length();

        while (number3 != number1) {
            number4 = number.charAt(number3) + "";
            number3++;
            number2 = Integer.parseInt(number4);
            if (number2 < 1)
                count3++;
            else if (number2 != 0)
                if (number2 % 2 == 0)
                    count2++;
                else
                    count1++;

        }


        System.out.println("\n奇数的个数：" + count1 + "\n偶数的个数：" + count2 + "\n0的个数：" + count3);
    }
}

